import numpy as np
from PIL import Image
"""
# show the orginal image, 
# the noisy image 
# and the result image(get by learning) during test
"""
def show_image(orginal_image, noisy_image, result_image, save_path):
    orginal_image = ((np.squeeze(orginal_image.asnumpy()) + 1) / 2.0 * 255.0).astype(np.uint8)
    noisy_image = ((np.squeeze(noisy_image.asnumpy()) + 1) / 2.0 * 255.0).astype(np.uint8)
    result_image = ((np.squeeze(result_image.asnumpy()) + 1) / 2.0 * 255.0).astype(np.uint8)
    image_s_numpy = np.concatenate((orginal_image, noisy_image, result_image))
    image_pil = Image.fromarray(image_s_numpy, mode='L')
    image_pil.save(save_path)